<%include ../common/include_header1.html%>

            <div class="cont">
            	<%include menu.html%>
            <div class="right">
              <div class="huisheng-success-wrap clearfix">
                <div class="huisheng-success" style="background: url(/web/images/success.jpg) no-repeat;"></div>
              </div>
                 <div class="lj">
                    <a href="/index.html"><img src="/web/images/tb6.png"></a> |
                    <a href="#"></a><a href="/index.html">首页</a>&gt; <a href="/company_dynamic/dynamic">招贤纳士</a> &gt; <a href="javascript:void(0)" id="mtitle"></a>
                    <!-- <a href="#">企业简介</a> -->
                </div>
                <div class="right_nr"> 
                </div>
            </div>
            <div class="clear"></div>
            <style type="text/css">
            	.page{    text-align: center;
    font-size: 14px;
    margin: 40px 30px;}
            	.page a{    color: #000;
    border: 1px solid #ededed;
    background: #fbfcfb;
    padding: 5px 10px;margin-left: 4px;}
    .page a:hover {
    color: #f00000;
}
.layui-laypage-curr{  color: #000;
    border: 1px solid #ededed;
    background: #fbfcfb;
    padding: 5px 10px;}
    .layui-laypage-curr em{font-style: normal;}
    .layui-laypage-curr em:hover{color: #f00000;}
            </style>
        </div>
<script type="text/javascript" src="/web/layui/layui.js"></script>
<script>
    //一般直接写在一个js文件中
    layui.use(['layer', 'laypage','form'], function(){
        var layer = layui.layer
                ,laypage = layui.laypage
                , $ = layui.jquery;
 		 var value="<%=value%>";
        //页面初始化的时候执行
        $(function (){
            $("#news").addClass("active");
           //第一个参数：多少页，第二个参数，新闻类型，0企业动态，1媒体报道，2活动报道
          
           switch(value){
           	case 'recruit':getData(1,0);
           		$("#mtitle").text("招聘信息")
           	break;
           	
           }
          
            
        });

        //从后台获取数据函数，获取页数curr的数据
        function getData(curr,category){
            $.post("/web/get_recruit_by_Category1",{curr:curr,category:category},function(result){
                //拼接html内容
                var tabContent="";
                //获取后台json数据
                var mydata=result.data;
                tabContent+='<div class="qz-bt">'
                     for(var i=0;i<mydata.length;i++){
                       tabContent+='<a href="/submit_information">'+mydata[i].position+'</a>';
                                              
                }
                          tabContent+='<div class="clear"></div></div>'
                for(var i=0;i<mydata.length;i++){
			        	
                	var tempStr='<div class="qz_nr"><table width="100%" border="0" cellspacing="1" cellpadding="0"><tbody>'+
                	              '<tr><td width="25%" height="35" bgcolor="#f7f7f7"><p><span>职位名称:</span>'+mydata[i].position+'</p></td>'+
                	              '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>发布时间:</span>'+mydata[i].time+'</p></td>'+
                	              '<td width="25%" height="35" bgcolor="#f7f7f7">&nbsp;</td>'+
                	              '<td width="25%" height="35" bgcolor="#f7f7f7">'+
                	              '<a href="/submit_information"><input type="submit" name="button" id="button" value="我要应聘" class="my_yp"></a>'+
                	              '</td></tr>'+
                	              '<tr><td width="25%" height="35" bgcolor="#f7f7f7"><p><span>招聘人数:</span>'+mydata[i].population+'</p></td>'+
                                '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>工作地点:</span>'+mydata[i].place+'</p></td>'+
                                '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>性别:</span>'+mydata[i].sex+'</p></td>'+
                                 '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>年龄:</span>'+mydata[i].age+'</p></td></tr>'+
                                 
                                 '<tr><td width="25%" height="35" bgcolor="#f7f7f7"><p><span>工龄:</span>'+mydata[i].seniority+'</p></td>'+
                                '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>学历:</span>'+mydata[i].educational+'</p></td>'+
                                '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>语言:</span>'+mydata[i].language+'</p></td>'+
                                 '<td width="25%" height="35" bgcolor="#f7f7f7"><p><span>待遇:</span>'+mydata[i].treatment+'</p></td></tr>'+
                                 '<tr><td colspan="4" bgcolor="#FFFFFF"><div class="zp_nr">'+mydata[i].content+'</div></td></tr></tbody></table></div>';
                	tabContent+=tempStr;
//                  var tempStr='<tr id='+mydata[i]._id+'>'+
//                              /*序号分页后也必须得变动,每页十条数据*/
//                          '<td>'+(i+(curr-1)*10+1)+'、 <a href="/news_detail/'+mydata[i]._id+'" class="a_color">'+mydata[i].title+'</a><span class="pull-right">'+mydata[i].time+'</span></td>'+
//                          '</tr>'
                    
                }
                //将拼接好的数据填入#tabContent中
                
                $(".right_nr").eq(0).html(tabContent);
                //显示分页
//              laypage({
//                  cont: 'page', //容器。值支持id名、原生dom对象，jquery对象。【如该容器为】：<div id="page1"></div>
//                  pages: result.pages, //通过后台拿到的总页数
//                  curr: curr || 1, //当前页
//                  skin: '#c52d2f',
//                  layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip'],
//                  jump: function(obj, first){ //触发分页后的回调
//                      if(!first){ //点击跳页触发函数自身，并传递当前页：obj.curr
//                      	switch(value){
//					           	
//					           	case 'recruit':	getData(obj.curr,0);break;
//					           }
//                      }
//                  }
//              });
                
            });
        };
    });
</script>
<%include ../common/include_footer1.html%>
    

  